//引用Vuex
import Vue from 'vue'
import Vuex from 'vuex'
import db from '../utils/db'
Vue.use(Vuex)

//实例store对象
const store = new Vuex.Store({
	state: {
		// website:"http://www.japan-house.com/",
		website: 'https://ylhl.oshainiu.cn',
		ossUrl: "https://imgs.wkdns.cn/ylhl",
		count: 6,
		appInfo: {},
		version: "",
		personData: {},
		token: 2953,
		userInfo: {},
		isLogin:true,

	},
	mutations: {
		setAppInfo(state, res) {
			state.appInfo = res
		},
		setVersion(state, res) {
			state.version = res
		},
		setPersonData(state, res) {
			state.personData = res
		},
		setToken(state, res) {
			state.token = res
		},
		setUser(state, res) {
			state.userInfo = res
		},
		setIsLogin(state, res) {
			state.isLogin = res
		},
	}


})

//导出store对象
export default store